<!--
<template>
  <div>
    <template>
      <div>
        <a-tabs default-active-key="1">
          <a-tab-pane key="1" tab="视图窗口" force-render>渲染</a-tab-pane>
        </a-tabs>
      </div>
    </template>
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  methods: {
    callback(key) {
      console.log(key)
    }
  }
}
</script>
<style>
</style>-->
<template>
  <div class="box">
<!--      <edit v-model="code" @running="running"></edit>-->
    <a-card size="small" :title="title" style="width: 100%;margin-top: 0px">
      <running :value="code" ref="run"></running>
    </a-card>

  </div>
</template>
<script>
  import Edit from '../preview/edit'
  import Running from '../preview/running'
  export default {
    name: 'index',
    components: {
      Edit,
      Running
    },
    data () {
      return {
        code: '',
        title:'预览视图渲染'
      }
    },
    methods: {
      running () {
        console.log(this.code)
        this.$refs.run.reset()
        this.$refs.run.buildDom(this.code)
      }
    }
  }
</script>
<style lang="scss" scoped>
  .box {
    min-width: 100%;
    overflow: auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
  }
</style>